{% load url_parameters %}
<div class="pagination pagination-right">
    <ul>
        {% if paginate.has_previous %}
            <li><a href="{% url_add_query page=1 %}">&laquo;</a></li>
            <li><a href="{% url_add_query page=paginate.previous_page_number %}">&lsaquo;</a></li>
            <li><a href="{% url_add_query page=paginate.previous_page_number %}">{{ paginate.previous_page_number }}</a></li>
        {% else %}
            <li class="disabled"><a href="">&laquo;</a></li>
            <li class="disabled"><a href="">&lsaquo;</a></li>
        {% endif %}

        <li><a class="active" href="{% url_add_query page=paginate.number %}">{{ paginate.number }}</a></li>

        {% if paginate.has_next %}
            <li><a href="{% url_add_query page=paginate.next_page_number %}">{{ paginate.next_page_number }}</a></li>
            <li><a href="{% url_add_query page=paginate.next_page_number %}">&rsaquo;</a></li>
            <li><a href="{% url_add_query page=paginate.paginator.num_pages %}">&raquo;</a></li>
        {% else %}
            <li class="disabled"><a href="">&rsaquo;</a></li>
            <li class="disabled"><a href="">&raquo;</a></li>
        {% endif %}
    </ul>
</div>
